﻿using System;
using System.ComponentModel;

namespace YArchitech.HYSpace
{
	public class PropertyGridItem
	{
		public PropertyGridItem(string sName, object sValue)
		{
			this._name = sName;
			this._value = sValue;
		}

		public PropertyGridItem(string sName, object sValue, bool sReadonly, bool sVisible)
		{
			this._name = sName;
			this._value = sValue;
			this._readonly = sReadonly;
			this._visible = sVisible;
		}

		public string Name
		{
			get
			{
				return this._name;
			}
			set
			{
				this._name = value;
			}
		}

		public string DisplayName
		{
			get
			{
				return this._displayname;
			}
			set
			{
				this._displayname = value;
			}
		}

		public TypeConverter Converter
		{
			get
			{
				return this._converter;
			}
			set
			{
				this._converter = value;
			}
		}

		public string Category
		{
			get
			{
				return this._category;
			}
			set
			{
				this._category = value;
			}
		}

		public object Value
		{
			get
			{
				return this._value;
			}
			set
			{
				this._value = value;
			}
		}

		public bool ReadOnly
		{
			get
			{
				return this._readonly;
			}
			set
			{
				this._readonly = value;
			}
		}

		public bool Visible
		{
			get
			{
				return this._visible;
			}
			set
			{
				this._visible = value;
			}
		}

		public virtual object Editor
		{
			get
			{
				return this._editor;
			}
			set
			{
				this._editor = value;
			}
		}

		private string _name = string.Empty;

		private object _value;

		private bool _readonly;

		private bool _visible = true;

		private string _category = string.Empty;

		private TypeConverter _converter;

		private object _editor;

		private string _displayname = string.Empty;
	}
}
